/*
 * @Author: Zeratul
 * @Date: 2020-08-21 16:47:36
 * @LastEditTime: 2020-08-24 05:00:30
 * @FilePath: \sz-h5-2003-react-mobile\zhangminhui\eleme-react\eleme-user\src\utils\myaxios.js
 */

import axios from "axios"
const instance = axios.create({
    baseURL: process.env.REACT_APP_URL,
});

instance.interceptors.request.use(function (config) {
    return config;
  }, function (error) {
    return Promise.reject(error);
  });

instance.interceptors.response.use(function (response) {
    console.log(response);
    return response.data;
  }, function (error) {
    return Promise.reject(error);
  });
  export default instance